<template>
  <div class="qualityteam-container">
    <!-- 顶部标题 -->
    <el-row justify="center" class="header-row">
      <el-col :span="24" class="title">一冷运营区域质量日报</el-col>
    </el-row>

    <!-- 汽车板生产情况 表格-->
    <el-row :gutter="16" class="main-tables">
      <el-col :span="24">
        <el-card shadow="hover" class="stat-card">
          <div class="card-title">汽车板生产情况</div>
          <el-table :data="mainTargetData" border size="small">
            <el-table-column prop="item" label="类型" align="center" width="80"/>
              <el-table-column label="当日" align="center" >
              <el-table-column prop="A1" label="投料量（吨）" width="90" align="center"/>
              <el-table-column prop="A2" label="产出量（吨" width="90" align="center"/>
              <el-table-column prop="A3" label="合格量（吨）" width="90" align="center"/>

              <el-table-column prop="A4" label="内部降级量（吨）" width="120" align="center"/>
              <el-table-column prop="A5" label="外部降级量（吨）"  width="120" align="center"/>
              <el-table-column prop="A6" label="综合合格率（%）" width="120" align="center"/>

              <el-table-column prop="A7" label="内部合格率（%）"  width="120" align="center"/>
            </el-table-column>
            

            <el-table-column label="累计" align="center" >
              <el-table-column prop="B1" label="投料量（吨）" width="90" align="center"/>
              <el-table-column prop="B2" label="产出量（吨" width="90" align="center"/>
              <el-table-column prop="B3" label="合格量（吨）" width="90" align="center"/>

              <el-table-column prop="B4" label="内部降级量（吨）"  width="120" align="center"/>
              <el-table-column prop="B5" label="外部降级量（吨）"  width="120" align="center"/>
              <el-table-column prop="B6" label="综合合格率（%）"  width="120" align="center"/>

              <el-table-column prop="B7" label="内部合格率（%）"  width="120" align="center"/>
            </el-table-column>
            </el-table>
        </el-card>
      </el-col>
    </el-row>

      <!-- 汽车板生产情况  折线图 -->
      <el-row :gutter="16" class="sub-tables">
      <el-col :span="24">
        <el-card class="tcm1-right-mid-card2" shadow="hover">
            <div style="width: 100%; height: 100%">
              <graph-line 
                :data1="CarData_Zhexiantu1"  
                :datax="CarData_Zhexiantux" 
                :data-name="CarData_Zhexiantuname" 
                :title="'汽车板合格率趋势（%）'" 
                :max="103" 
                :min="90" />
            </div>
            <!-- <div class="tcm1-mid-mid-card1-graph"></div>   -->
          </el-card>
      </el-col>
    </el-row>



    
    <!-- 汽车板生产情况 柱状图-->
    <el-row :gutter="16" class="sub-tables">
    
      <el-col :span="12">
        <el-card shadow="hover" class="stat-card">
          <div class="tcm1-mid-mid-card2-graph common-div-card">
              <graph-bar-other
                :data1="speProdSteel1"
                :data2="speProdSteel2"
                :datax="speProdSteelx"
                :title="'一冷冷轧'"
                :max="10000"
                :min="0"
              />
            </div>
        </el-card>
      </el-col>


      <el-col :span="12">
        <el-card shadow="hover" class="stat-card">
          <div class="tcm1-mid-mid-card2-graph common-div-card">
              <graph-bar-other
                :data1="CarSteel1"
                :data2="CarSteel2"
                :datax="CarSteelx"
                :title="'一冷镀锌'"
                :max="10000"
                :min="0"
              />
            </div>
        </el-card>
      </el-col>

    </el-row>

    
    
  </div>
</template>

<script setup lang="ts">
  import { ref } from 'vue';
  import GraphBarOther from '../components/GraphBarOther.vue';
  import GraphLine from '../components/GraphLine.vue';


//汽车板生产情况，表格数据
  const mainTargetData = [
    { item: '一冷冷轧', A1: 100, A2: 110, A3: 120, A4: 130, A5: 460,A6:520,A7:520, B1: 100, B2: 110, B3: 120, B4: 130, B5: 460,B6:520,B7:520 },
    { item: '一冷镀锌', A1: 151, A2: 247, A3: 474, A4: 654, A5: 578,A6:471,A7:254, B1: 365, B2: 321, B3: 74, B4: 230, B5: 147,B6:354,B7:258 },
    { item: '酸洗',  A1: 254, A2: 354, A3: 258, A4: 478, A5: 460,A6:147,A7:369, B1: 258, B2: 235, B3: 587, B4: 254, B5: 258,B6:456,B7:147 },
    { item: '汽车板总计',  A1: 698, A2: 547, A3: 654, A4: 987, A5: 874,A6:987,A7:951, B1: 974, B2: 874, B3: 698, B4: 987, B5: 852,B6:963,B7:852 },
  ];

  //一冷冷轧，柱状图数据center
  const speProdSteel1 = ref<any>([100,110 ,120, 130, 460,520,520]); 
  const speProdSteel2 = ref<any>([151,  247,  474,  654, 578,471,254]); 
  const speProdSteelx = ref<any>(['投料量', '产出量', '合格量','内部降级量','外部降级量','综合合格率','内部合格率']);



  //一冷镀锌，柱状图数据center
  const CarSteel1 = ref<any>([151,  247,  474,  654, 578,471,254]); 
  const CarSteel2 = ref<any>([100,110 ,120, 130, 460,520,520]);
  const CarSteelx   = ref<any>(['投料量', '产出量', '合格量','内部降级量','外部降级量','综合合格率','内部合格率']);

    //一冷冷轧，柱状图数据center
  const speProdSteel1_2 = ref<any>([100,110 ,120, 130, 460,520,520]); 
  const speProdSteel2_2 = ref<any>([151,  247,  474,  654, 578,471,254]); 
  const speProdSteelx_2 = ref<any>(['投料量', '产出量', '合格量','内部降级量','外部降级量','综合合格率','内部合格率']);



  //一冷镀锌，柱状图数据center
  const CarSteel1_2 = ref<any>([151,  247,  474,  654, 578,471,254]); 
  const CarSteel2_2 = ref<any>([100,110 ,120, 130, 460,520,520]);
  const CarSteelx_2   = ref<any>(['投料量', '产出量', '合格量','内部降级量','外部降级量','综合合格率','内部合格率']);
  

    //汽车板生产情况 折线图
    const CarData_Zhexiantu1 = ref<any>([98, 100, 92, 96,102,98,100,95]);
  // const CarData_Zhexiantu2 = ref<any>([101, 98, 96, 93,99,98,90,102]);
  // const CarData_Zhexiantu3 = ref<any>([91, 99, 103, 98,100,98,95,94]);
  const CarData_Zhexiantux = ref<any>(['7月22日', '7月23日', '7月24日', '7月25日', '7月26日', '7月27日', '7月28日', '7月29日']);
  const CarData_Zhexiantuname = ref<any>(['合格率']);

  onBeforeMount(() => {});
</script>

<style lang="less" scoped>
  @border-radius: 8px;
  @primary-color: #2c69e8;
  @box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  @box-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
  @border:1px solid #dcdfe6;

  .tcm1-right-mid-card2 {
    width: 100%;
    height: 25vh;
    flex-wrap: nowrap;
    margin-top: 1vh;
    margin-bottom: 3vh;

    :deep(.el-card__body) {
      display: flex;
      justify-content: space-between;
      width: 100%;
      height: 100%;
    }
  }

  .qualityteam-container {
    padding: 18px 18px 0 18px;
    background: #f6f8fa;
  }
  .header-row .title {
    font-size: 2rem;
    font-weight: bold;
    color: #009966;
    letter-spacing: 0.5em;
    text-align: center;
    margin-bottom: 18px;
  }
  .card-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 8px;
  }
  .stat-card {
    margin-bottom: 16px;
  }
  .device-issue-row {
    margin-bottom: 16px;
  }
  .device-issue-card {
    background: #fffbe6;
  }
  .device-issue-content {
    color: #333;
    font-size: 0.98rem;
    line-height: 1.7;
    margin-top: 8px;
  }
  .bottom-card {
    margin-top: 18px;
  }
  .search-bar {
    margin-bottom: 0;
  }
  .center-panel {
  width: 33.33%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
}
.center-row {
  width: 100%;
  height: 50%;
}
.card-bj{
  background-image: url('/src/assets/images/cut331.png');
  height: 26px;
  padding-top:5px;
  margin-bottom: 4px;
}
.tcm1-mid-mid-card2-graph {
    height: 25vh;
    width: 100%;
    margin-top: 1vh;
    box-shadow: @box-shadow;
    border-radius: @border-radius;
  }



</style>
